//
//  SLCar.m
//  Objective-C
//
//  Created by 陆承东 on 2018/11/10.
//  Copyright © 2018 S_Line. All rights reserved.
//

#import "SLCar.h"

@implementation SLCar

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if ([super init]) {
        self.color = [aDecoder decodeObjectForKey:@"color"];
        self.wheels = [aDecoder decodeIntegerForKey:@"wheels"];
        self.createDate = [aDecoder decodeObjectForKey:@"createDate"];
    }
    return self;
}


- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.color forKey:@"color"];
    [aCoder encodeInteger:self.wheels forKey:@"wheels"];
    [aCoder encodeObject:self.createDate forKey:@"createDate"];
}

@end
